# from collections import deque
# from collections import Counter
#
# a = deque(list(range(10)), maxlen=5)
# print(a)
#
# a.appendleft(123)
# print(a)
# list_a = [1, 22, 33, 44, 5, 2, 3, 4, 5, 2, 2, 3, 4, 3, 4, 2, 1, 2, 3, 1, 3, 1, 2, 4]
# data = Counter(list_a)
# print(data.items())
# res = list(data.items())
# for i in res:
#     print(f'{i[0]}出现了{i[1]}次', end=',')


import json

# data = {'name': 'jins', 'age': 22, 'country': 'China'}
# data_json = json.dumps(data)
# print(data_json, type(data_json))
# data_dict = json.loads(data_json)
# print(data_dict, type(data_dict))
#
# res = json.dumps(1)
# print(type(res))
#
# data = {'name': 'jins', 'age': 22, 'country': 'China'}
# with open('test.txt', 'w') as f:
#     json.dump(data, f)
# data = {'name': 'jins', 'age': 22, 'country': 'China'}
# data_json = json.dumps(data)
# data_decoded = json.loads(data_json)
# print(data_decoded)
# print(type(data_decoded))

#
# with open('test.txt') as f:
#     res = json.load(f)
# print(res)
# print(type(res))


data = {'a': 1, 'b': 'abc'}
res = json.dumps(data, separators=(':', ','))
print(len(res))
